package educationaladministrationsystem.CSM.Controller.StudentAndTeacher.Student;

import educationaladministrationsystem.Result.Result;
import educationaladministrationsystem.CSM.Mapper.Service.StudentAndTeacher.Student.StudentCourseScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("Student/CourseSchedule")
public class StudentCourseScheduleController {
    @Autowired
    private StudentCourseScheduleService courseScheduleService;

    @GetMapping("/getStudentCourse")
    public Result getStudentCourse(@RequestParam String UID) {
        return Result.success(courseScheduleService.getStudentCourse(UID));
    }

    @GetMapping("/getCourseByCourseId")
    public Result getCourseByCourseId(@RequestParam String id) {
        return Result.success(courseScheduleService.getCourseByCourseId(id));
    }
}
